package com.mlk.good.service;

import com.mlk.core.component.page.Pager;
import com.mlk.core.util.ServerResponse;
import com.mlk.good.po.EngGoodOrder;
import com.mlk.good.vo.EngGoodOrderVO;

import java.util.TreeMap;

public interface EngGoodOrderService {
    /**
     * 初始化订单
     * @param order
     * @return
     */
    ServerResponse initOrder(EngGoodOrder order);

    /**
     * 取消订单
     * @param orderCode
     * @return
     */
    ServerResponse cancelOrder(String orderCode);

    /**
     * 估算订单信息
     * @param vo
     * @return
     */
    ServerResponse calculateOrderPrice(EngGoodOrderVO vo);

    /**
     * 查询订单
     * @param openId
     * @param status
     * @return
     */
    ServerResponse queryOrder(String openId, Integer status);

    /**
     * 分页查询参数
     * @param vo
     * @return
     */
    Pager listPage(EngGoodOrderVO vo);

    /**
     * 订单预支付
     * @param openId
     * @param orderCode
     * @return
     */
    ServerResponse prePayCheck(String openId, String orderCode);

    /**
     * 查询订单详情
     * @param orderCode
     * @return
     */
    ServerResponse getOrderDetail(String orderCode);

    /**
     * 查询已经完成的订单
     * @param openId
     * @return
     */
    Pager queryFinishedOrder(String openId);

    ServerResponse customConfirmOrder(String orderCode);

    /**
     * 用户接单
     * @param orderCode
     * @return
     */
    ServerResponse accept(String orderCode);

    /**
     * 订单发货
     * @param orderCode
     * @return
     */
    ServerResponse send(String orderCode);

    /**
     * 订单支付
     * @param orderCode
     * @return
     */
    ServerResponse payOrder(String orderCode);

    /**
     * 处理微信结果
     * @return
     */
    String handleWxPayOrderNotifyResult(TreeMap<String,String> params);
}
